package com.heima.schedule.service;

import com.heima.model.schedule.dtos.Task;

public interface TaskService {

    public long addTask(Task task);

    public boolean cancelTask(Long taskId );

    /**
     * 按照类型和优先级拉取任务
     * @param type
     * @param priority
     * @return
     */
    public Task poll(int type,int priority);

    public void addTaskToDB(Task task);


}
